package cn.cvs.controller;

import cn.cvs.service.UserService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;

//@Controller
public class UserController {
    @Resource
    UserService userService;
    @RequestMapping("/user/list")
    public String userList(Model model){

        model.addAttribute("userlist",userService.findAll());
        return "userlist.jsp";
    }

    @RequestMapping("/role/list")
    public String roleList(){
        return "rolelist.jsp";
    }
}
